package org.example.mall4j.Service;

import org.example.mall4j.pojo.SysUser;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

/*服务类接口，继承用户信息服务的接口 UserDetailsService*/
public interface UserService extends UserDetailsService {
    //按姓名查找用户
    SysUser findByName(String name);

    //增加用户
    int insert(SysUser user);

    //加载用户信息，按照姓名
    @Override
    UserDetails loadUserByUsername(String name) throws UsernameNotFoundException;
}

